﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DatabaseLayer;

namespace ControlLayer
{
    class AirportCtr
    {

        static TablesDataContext db = new TablesDataContext();

        public void CreateAirport(string name, string initial, string city, string country, int latitude, int longitude)
        {
            Airport air = new Airport();
            air.name = name;
            air.initial = initial;
            air.city = city;
            air.country = country;
            air.latitude = latitude.ToString();
            air.longitude = longitude.ToString();
            
            db.Airports.InsertOnSubmit(air);
            db.SubmitChanges();
        }

    }
}
